﻿namespace UniSender
{
    public class Campaign
    {
        public int Id { get; set; }
        public CampaingStatus Status { get; set; }
        public int Count { get; set; }
        public int PeriodMessages { get; set; }
        public int PrepaidMessages { get; set; }
        public decimal PaySum { get; set; }
        public Currency Currency { get; set; }

        public Campaign()
        { }

        public Campaign(Native.Campaign native)
        {
            Id = native.campaing_id;
            Status = Utility.ParseEnum<CampaingStatus>(native.status);
            Count = native.count;
            PeriodMessages = native.period_messages;
            PrepaidMessages = native.prepaid_messages;
            PaySum = native.pay_sum;
            Currency = Utility.ParseEnum<Currency>(native.currency);
        }
    }
}
